3.3.3 \(\int \sqrt {-1+\tanh ^2(x)} \, dx\) [203]

Optimal. Leaf size=16 \[ -\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {-\text {sech}^2(x)}}\right ) \]

[Out]

-arctanh(tanh(x)/(-sech(x)^2)^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3738, 4207, 223, 212} \begin {gather*} -\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {-\text {sech}^2(x)}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[-1 + Tanh[x]^2],x]

[Out]

-ArcTanh[Tanh[x]/Sqrt[-Sech[x]^2]]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 3738

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4207

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[b*(ff/
f), Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps

\begin {align*} \int \sqrt {-1+\tanh ^2(x)} \, dx &=\int \sqrt {-\text {sech}^2(x)} \, dx\\ &=-\text {Subst}\left (\int \frac {1}{\sqrt {-1+x^2}} \, dx,x,\tanh (x)\right )\\ &=-\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\tanh (x)}{\sqrt {-\text {sech}^2(x)}}\right )\\ &=-\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {-\text {sech}^2(x)}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 21, normalized size = 1.31 \begin {gather*} 2 \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right ) \cosh (x) \sqrt {-\text {sech}^2(x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[-1 + Tanh[x]^2],x]

[Out]

2*ArcTan[Tanh[x/2]]*Cosh[x]*Sqrt[-Sech[x]^2]

________________________________________________________________________________________

Maple [A]
time = 0.74, size = 15, normalized size = 0.94

method result size
derivativedivides \(-\ln \left (\tanh \left (x \right )+\sqrt {-1+\tanh ^{2}\left (x \right )}\right )\) \(15\)
default \(-\ln \left (\tanh \left (x \right )+\sqrt {-1+\tanh ^{2}\left (x \right )}\right )\) \(15\)
risch \(i \sqrt {-\frac {{\mathrm e}^{2 x}}{\left (1+{\mathrm e}^{2 x}\right )^{2}}}\, {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right ) \ln \left ({\mathrm e}^{x}+i\right )-i \sqrt {-\frac {{\mathrm e}^{2 x}}{\left (1+{\mathrm e}^{2 x}\right )^{2}}}\, {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right ) \ln \left ({\mathrm e}^{x}-i\right )\) \(72\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-1+tanh(x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-ln(tanh(x)+(-1+tanh(x)^2)^(1/2))

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.50, size = 5, normalized size = 0.31 \begin {gather*} 2 i \, \arctan \left (e^{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+tanh(x)^2)^(1/2),x, algorithm="maxima")

[Out]

2*I*arctan(e^x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+tanh(x)^2)^(1/2),x, algorithm="fricas")

[Out]

0

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\tanh ^{2}{\left (x \right )} - 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+tanh(x)**2)**(1/2),x)

[Out]

Integral(sqrt(tanh(x)**2 - 1), x)

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 1, normalized size = 0.06 \begin {gather*} 0 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+tanh(x)^2)^(1/2),x, algorithm="giac")

[Out]

0

________________________________________________________________________________________

Mupad [B]
time = 0.25, size = 14, normalized size = 0.88 \begin {gather*} -\ln \left (\mathrm {tanh}\left (x\right )+\sqrt {{\mathrm {tanh}\left (x\right )}^2-1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((tanh(x)^2 - 1)^(1/2),x)

[Out]

-log(tanh(x) + (tanh(x)^2 - 1)^(1/2))

________________________________________________________________________________________